#ifndef Request_h
#define Request_h

#include "Header.h"
#include "Error.h"


class Request_T
{
public:
	Error_T::Code_T Parse(const Buffer_T & rawStream);
	void Free()
	{
		_headerList.Free();
		_verb.Free();
		_uri.Free();
		_schema.Free();
		_url.Free();
		_query.Free();
		_fragment.Free();
		_version.Free();
	};

public:
	Buffer_T & Verb()				{ return _verb;			};
	Buffer_T & Uri()				{ return _uri;			};
	Buffer_T & Schema()				{ return _schema;		};
	Buffer_T & Url() 				{ return _url;			};
	Buffer_T & Query()				{ return _query;		};
	Buffer_T & Fragment()			{ return _fragment;		};
	Buffer_T & Version() 			{ return _version;		};
	List_T<Header_T> & Headers()	{ return _headerList;	};

private:
	Buffer_T _verb;
	Buffer_T _uri;
	Buffer_T _schema;
	Buffer_T _url;
	Buffer_T _query;
	Buffer_T _fragment;
	Buffer_T _version;
	List_T<Header_T> _headerList;
};

#endif //Request_h